﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Agenda;

namespace AgendaForms
{
    public partial class FrmAgenda : Form
    {
        private AgendaSist modelo;
        
        public FrmAgenda()
        {
            InitializeComponent();
            modelo = AgendaSist.GetInstance();
        }

        private void btnAgregar_Click(object sender, EventArgs e)
        {
            Contacto contacto = new Contacto(txtNombre.Text, txtApellido.Text, txtTelefono.Text, txtTipo.Text);
            modelo.AgregarContacto(contacto);
        }

        private void btnVerLista_Click(object sender, EventArgs e)
        {
            new FrmContactos().Show();

        }
    }
}
